<!DOCTYPE html>



  


<html class="theme-next gemini use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/blog/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/blog/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/blog/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/blog/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="笔记,Spring MVC," />










<meta name="description" content="Mastering Spring MVC4 Note">
<meta name="keywords" content="笔记,Spring MVC">
<meta property="og:type" content="article">
<meta property="og:title" content="精通 Spring MVC4 笔记">
<meta property="og:url" content="https://scorpiozhoulei.gitee.io/blog/2018/05/02/精通-Spring-MVC4-笔记/index.html">
<meta property="og:site_name" content="zlTuring的博客">
<meta property="og:description" content="Mastering Spring MVC4 Note">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2018-05-16T08:19:39.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="精通 Spring MVC4 笔记">
<meta name="twitter:description" content="Mastering Spring MVC4 Note">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/blog/',
    scheme: 'Gemini',
    version: '5.1.4',
    sidebar: {"position":"right","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://scorpiozhoulei.gitee.io/blog/2018/05/02/精通-Spring-MVC4-笔记/"/>





  <title>精通 Spring MVC4 笔记 | zlTuring的博客</title>
  








</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-right page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/blog/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">zlTuring的博客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">zlblog</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/blog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/blog/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/blog/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/blog/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/blog/about/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://scorpiozhoulei.gitee.io/blog/blog/2018/05/02/精通-Spring-MVC4-笔记/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="zlTuring">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/imgs/Menhera-help.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="zlTuring的博客">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">精通 Spring MVC4 笔记</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2018-05-02T10:30:23+08:00">
                2018-05-02
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/读书/" itemprop="url" rel="index">
                    <span itemprop="name">读书</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          

          
              <div class="post-description">
                  Mastering Spring MVC4 Note
              </div>
          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="目录"><a href="#目录" class="headerlink" title="目录"></a>目录</h1><p>生活就像巧克力你永远不知道下一秒会得到什么。<br>本书是基于Spring Boot 1.2.5版本</p>
<h2 id="快速搭建Spring-Web应用"><a href="#快速搭建Spring-Web应用" class="headerlink" title="快速搭建Spring Web应用"></a>快速搭建Spring Web应用</h2><p>有4种方式可以开启一个spring项目</p>
<ul>
<li>使用Spring Tool Suite（STS）生产Starter代码</li>
<li>使用InterIIij IDEA 它对Spring Boot提供了良好的支持</li>
<li>访问Spring站点，从<a href="http://start.Spring.io" target="_blank" rel="noopener">http://start.Spring.io</a>上下载可配置的ZIP文件</li>
<li>使用cutl命令来访问Spring站点</li>
</ul>
<p>如果你以前搭建过Spring MVC 应用，那么可能已经习惯于编写相关的XML文件或者Java注解配置类。<br>一般来说，初始化步骤如下</p>
<ol>
<li>初始化Spring MVC 的DispatcherServlet</li>
<li>搭建转码过滤器，保证客户端请求进行正确的转码</li>
<li>搭建师徒解析器（view resolver），告诉Spring去哪里查找视图，以及它们是使用哪种方言写的（JSP、Thymeleaf模版）</li>
<li>配置静态资源位置（CSS、JS）</li>
<li>配置所支持的地域以及资源bundle（.properties文件）</li>
<li>配置multipart解析器，保证文件上传能够正常工作</li>
<li>将Tomcat或Jetty包含进来，从而能够在web服务器上正常运行</li>
<li>建立错误页面（404）<br>这些，SpringBoot都为我们做了，它基于约定，并默认认为会在你的项目中使用这些约定。</li>
</ol>
<h3 id="分发器（DispatcherServlet）和multipart配置"><a href="#分发器（DispatcherServlet）和multipart配置" class="headerlink" title="分发器（DispatcherServlet）和multipart配置"></a>分发器（DispatcherServlet）和multipart配置</h3><p>将application.properties 中添加一行</p>
<pre><code>dubug=true
</code></pre><p>将看到SpringBoot的自动配置报告。<br>分为两部分：<br>一部分是匹配上的（positive matches）<br>没有匹配上的（negative matches）</p>
<p>DispatcherServletAutoConfiguration 类 详细可以查看源码</p>
<h3 id="视图解析器、静态资源以及区域配置"><a href="#视图解析器、静态资源以及区域配置" class="headerlink" title="视图解析器、静态资源以及区域配置"></a>视图解析器、静态资源以及区域配置</h3><p>application.properties文件中通过 spring.view.prefix 和spring.view.prefix 就可以将视图解析器搭建起来。（spring boot以后版本名字前缀变成spring.mvc了）</p>
<p>静态资源需要位于以下4个目录中的任意一个就会被加载</p>
<p>/META-INF/resources/,<br>/resources/,<br>/static/,<br>/public/.</p>
<p>WebMvcAutoConfiguration 类，详细可以查看源码</p>
<h3 id="错误与编码配置"><a href="#错误与编码配置" class="headerlink" title="错误与编码配置"></a>错误与编码配置</h3><p>application.properties文件中通过error.whitelable.enable 设置为false 将默认的错误页面设置为无效</p>
<p>我们还可以利用我们的模板引擎来提供我们自己的错误页面。例如，它将被命名为error.html。这是ErrorTemplateMissingCondition检查的条件。</p>
<p>就编码而言，非常简单的HttpEncodingAutoConfiguration函数将通过提供Spring的CharacterEncodingFilter类来处理它</p>
<p>使用spring.http.encoding可以重写默认编码（“UTF-8”），也可以通过spring.http.encoding.enabled禁用此配置</p>
<p>ErrorMvcAutoConfiguration 类 详细可以查看源码</p>
<h3 id="嵌入式Servlet容器的配置"><a href="#嵌入式Servlet容器的配置" class="headerlink" title="嵌入式Servlet容器的配置"></a>嵌入式Servlet容器的配置</h3><h3 id="其它配置"><a href="#其它配置" class="headerlink" title="其它配置"></a>其它配置</h3><p>在jscksonAutoConfiguration中声明使用jackson进行JSON序列化</p>
<h3 id="小结"><a href="#小结" class="headerlink" title="小结"></a>小结</h3><p>本书使用的是Spring Boot+ Gradle进行搭建。<br>项目地址可以在我的<a href="https://github.com/MrZhouL/masterspringmvc" target="_blank" rel="noopener">github</a>上看到。<br>学习最好的方法就是照着敲一边。</p>
<h2 id="精通MVC架构"><a href="#精通MVC架构" class="headerlink" title="精通MVC架构"></a>精通MVC架构</h2><p>We will continue to use the application from the previous chapter and build something more interesting. Our goal is to design a simple page where users can search for tweets corresponding to certain criteria and display them to our users. </p>
<p>We will see how to make Spring MVC work with a modern template engine, Thymeleaf, and try to understand the inner mechanics of the framework. We will route our users through different views, and nally, we will give a stellar look to our application using WebJars and Materialize </p>
<p>Spring Social Twitter <a href="http://projects.spring.io/spring-social-twitter/" target="_blank" rel="noopener">了解一下</a><br>WebJar 了解一下<br>Materialize <a href="https://materializecss.com/" target="_blank" rel="noopener">了解一下</a></p>
<h3 id="MVC-架构"><a href="#MVC-架构" class="headerlink" title="MVC 架构"></a>MVC 架构</h3><p>相信大多数人都对这个缩写不会陌生。它代表的是（Model）模型、（View）视图、（Controller）控制器，它会将数据和展现层进行解耦。<br>让我觉得该书对我有帮助的，我觉得还是下面这几点</p>
<h3 id="对MVC的质疑及其最佳实践"><a href="#对MVC的质疑及其最佳实践" class="headerlink" title="对MVC的质疑及其最佳实践"></a>对MVC的质疑及其最佳实践</h3><p>平时开发中就深有体会，明明框架好像都做了的事，我们又重复的做了一遍。如数据校验。想用它里面的技术，但真的不知道怎么用，只能google如何配置，遇到问题，解决不了，想还不如自己写。由此反复。</p>
<h4 id="贫血的领域模型"><a href="#贫血的领域模型" class="headerlink" title="贫血的领域模型"></a>贫血的领域模型</h4><p>Eric Evans出色的书籍Domain Driven Design对这些图层有以下说明。<br><blockquote><p>应用层：定义软件应该做的工作，并指导表达域对象来解决问题。该层负责的任务对业务有意义或者与其他系统的应用层进行交互所必需的。这层保持薄。它不包含业务规则或知识，只是协调任务并将工作委托给下一层下的域对象的协作。它没有反映业务情况的状态，但它可以具有反映用户或程序的任务进度的状态。<br>域层（或模型层）：负责表示业务概念，业务情况信息和业务规则。反映业务情况的状态在此处受到控制和使用，即使将其存储的技术细节委托给基础架构。这一层是商业软件的核心</p>
<footer><strong>Eric Evans</strong><cite>Domain Driven Design</cite></footer></blockquote><br>其中有一项核心的理念就是将面向对象的范式应用到领域对象之中。如果违背这一原则的话，就会被称之为贫血的领域模型（Anemic Domain Model）。<br>详细可以查看Martin Fowler的<a href="https://www.martinfowler.com/bliki/AnemicDomainModel.html" target="_blank" rel="noopener">博客</a>。<br>如何避免领域贫血的途径如下：</p>
<ol>
<li>服务层合适进行应用级别的抽象（如事务处理）而不是业务逻辑；</li>
<li>领域对象应该始终处于合法状态。通过校验器（validator）或JSR-303的校验注解，让校验过程在表单中进行；</li>
<li>将输入转化成有意义的领域对象；</li>
<li>将数据层按照Repository的方式来实现，Repository中会包含领域查询（参考Spring Data规范）；</li>
<li>将领域逻辑和底层的持久化解耦；</li>
<li>尽可能使用实际的对象，例如操作FirsName类而不是操作String。<h2 id="处理表单和复杂的URL映射"><a href="#处理表单和复杂的URL映射" class="headerlink" title="处理表单和复杂的URL映射"></a>处理表单和复杂的URL映射</h2>本章主要内容有：<br>处理表单<br>校验<br>自定义校验信息<br>自定义注解校验<br>国际化<br>客户端校验<br>总结来说可以推荐看一篇<a href="https://lmonkiewicz.com/programming/get-noticed-2017/spring-boot-rest-request-validation/" target="_blank" rel="noopener">博客</a>，于关REST的JSR303校验。可以作为本章的补充。他写的非常不错</li>
</ol>
<p>打算以后自己也写一篇博客补充。。</p>
<h2 id="文件上传于错误处理"><a href="#文件上传于错误处理" class="headerlink" title="文件上传于错误处理"></a>文件上传于错误处理</h2><h2 id="创建RESTful应用"><a href="#创建RESTful应用" class="headerlink" title="创建RESTful应用"></a>创建RESTful应用</h2><h2 id="保护应用"><a href="#保护应用" class="headerlink" title="保护应用"></a>保护应用</h2><h2 id="单元测试于验收测试"><a href="#单元测试于验收测试" class="headerlink" title="单元测试于验收测试"></a>单元测试于验收测试</h2><h2 id="优化请求"><a href="#优化请求" class="headerlink" title="优化请求"></a>优化请求</h2><h2 id="将web应用部署到云中"><a href="#将web应用部署到云中" class="headerlink" title="将web应用部署到云中"></a>将web应用部署到云中</h2><h2 id="超越-Spring-Web"><a href="#超越-Spring-Web" class="headerlink" title="超越 Spring Web"></a>超越 Spring Web</h2><h1 id="技术总结"><a href="#技术总结" class="headerlink" title="技术总结"></a>技术总结</h1><p>本书所用到的技术栈如下：</p>
<ol>
<li>Spring Boot</li>
<li>Spring MVC</li>
<li><a href="https://Gradle.org" target="_blank" rel="noopener">Gradle</a> 现代化的构建工具</li>
<li><a href="http://www.webjars.org" target="_blank" rel="noopener">WebJars</a> JAR包格式的JavaScript库，可以通过Maven中央仓库获取。</li>
<li>Thymeleaf 前端模版引擎（<a href="http://www.thymeleaf.org/doc/tutorials/2.1/thymeleafspring.html" target="_blank" rel="noopener">入门教程</a>）</li>
<li><a href="http://materializecss.com" target="_blank" rel="noopener">Materialize</a> 很漂亮的CSS和JavaScript库，和BootStrap类似。</li>
<li>RESTful 格式应用API </li>
<li><a href="http://springfox.github.io/springfox" target="_blank" rel="noopener">Swagger</a> 它能够在一个html5 web页面中，对API进行文档化和交互。</li>
<li>spring boot 下的 Spring Security应用</li>
<li>Spring Social 借助社交网站的OAuth实现认证功能</li>
<li>Reais </li>
</ol>
<p>扩展学习：<a href="https://github.com/spring-io/sagan" target="_blank" rel="noopener">sagan</a> github上的spring 开源项目， 它包含有很多有意思的特性</p>
<ol>
<li>基于Gradle的多模块项目；</li>
<li>集成了安全；</li>
<li>集成了Github</li>
<li>集成了Elasticsearch</li>
<li>JavaScript前端应用</li>
</ol>

      
    </div>
    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/blog/tags/笔记/" rel="tag"># 笔记</a>
          
            <a href="/blog/tags/Spring-MVC/" rel="tag"># Spring MVC</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/blog/2018/05/10/gradle指南之创建构建扫描/" rel="prev" title="gradle 指南之创建构建扫描">
                gradle 指南之创建构建扫描 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/blog/imgs/Menhera-help.jpg"
                alt="zlTuring" />
            
              <p class="site-author-name" itemprop="name">zlTuring</p>
              <p class="site-description motion-element" itemprop="description">zlTuring的博客</p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/blog/archives/">
              
                  <span class="site-state-item-count">12</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/blog/categories/index.html">
                  <span class="site-state-item-count">7</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/blog/tags/index.html">
                  <span class="site-state-item-count">17</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#目录"><span class="nav-number">1.</span> <span class="nav-text">目录</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#快速搭建Spring-Web应用"><span class="nav-number">1.1.</span> <span class="nav-text">快速搭建Spring Web应用</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#分发器（DispatcherServlet）和multipart配置"><span class="nav-number">1.1.1.</span> <span class="nav-text">分发器（DispatcherServlet）和multipart配置</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#视图解析器、静态资源以及区域配置"><span class="nav-number">1.1.2.</span> <span class="nav-text">视图解析器、静态资源以及区域配置</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#错误与编码配置"><span class="nav-number">1.1.3.</span> <span class="nav-text">错误与编码配置</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#嵌入式Servlet容器的配置"><span class="nav-number">1.1.4.</span> <span class="nav-text">嵌入式Servlet容器的配置</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#其它配置"><span class="nav-number">1.1.5.</span> <span class="nav-text">其它配置</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#小结"><span class="nav-number">1.1.6.</span> <span class="nav-text">小结</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#精通MVC架构"><span class="nav-number">1.2.</span> <span class="nav-text">精通MVC架构</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#MVC-架构"><span class="nav-number">1.2.1.</span> <span class="nav-text">MVC 架构</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#对MVC的质疑及其最佳实践"><span class="nav-number">1.2.2.</span> <span class="nav-text">对MVC的质疑及其最佳实践</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#贫血的领域模型"><span class="nav-number">1.2.2.1.</span> <span class="nav-text">贫血的领域模型</span></a></li></ol></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#处理表单和复杂的URL映射"><span class="nav-number">1.3.</span> <span class="nav-text">处理表单和复杂的URL映射</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#文件上传于错误处理"><span class="nav-number">1.4.</span> <span class="nav-text">文件上传于错误处理</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#创建RESTful应用"><span class="nav-number">1.5.</span> <span class="nav-text">创建RESTful应用</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#保护应用"><span class="nav-number">1.6.</span> <span class="nav-text">保护应用</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#单元测试于验收测试"><span class="nav-number">1.7.</span> <span class="nav-text">单元测试于验收测试</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#优化请求"><span class="nav-number">1.8.</span> <span class="nav-text">优化请求</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#将web应用部署到云中"><span class="nav-number">1.9.</span> <span class="nav-text">将web应用部署到云中</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#超越-Spring-Web"><span class="nav-number">1.10.</span> <span class="nav-text">超越 Spring Web</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#技术总结"><span class="nav-number">2.</span> <span class="nav-text">技术总结</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">zlTuring</span>

  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Gemini</a> v5.1.4</div>




        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  












  
  
    <script type="text/javascript" src="/blog/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  


  


  <script type="text/javascript" src="/blog/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/blog/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/blog/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/blog/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/blog/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  





  

  

  

  
  

  

  

  

</body>
</html>
